package MyArrays;

import java.util.Arrays;
import java.util.Comparator;

public class demo1 {
    public static void main(String[] args) {
        Integer []arr = {8,4,5,1,2,3,6,7,10,9};
        Arrays.sort(arr, (Integer o1, Integer o2) -> o1 - o2);
        System.out.println(Arrays.toString(arr));
    }
}
